using QAssetBundle;
using UnityEngine;
using QFramework;

namespace ProjectSurvivor
{
	public partial class TreasureChest : GamePlayObject
	{
		private void OnTriggerEnter2D(Collider2D other)
		{
			if (other.GetComponent<CollectibleArea>())
			{
				UIGamePanel.OpenTreasureChestPanel.Trigger();
				AudioKit.PlaySound(Sfx.TREASURECHEST);
				this.DestroyGameObjGracefully();
			}
		}

		protected override Collider2D collider2d => SelfCircleCollider2D;
	}
}
